import React from 'react';

import Constants from '../../common/Constants';
import CommonRequestDataAction from '../common/CommonRequestDataAction';

//请求帖子列表
export default class QZ_UncheckedList extends CommonRequestDataAction {
  constructor(props){
    super(props);
    this.moduleType = Constants.MODULE_TYPE.QUAN_ZI;
    this.name = "QZ_UncheckedList";
  }
  finish(data, isSucceed, response) {
      if(isSucceed) {
        let dic ={viewStatus: 3,isResponeUpdate: true,data:data.posts||[]}
        this.caller.setState(dic)
        this.onFinishSuccess(data, response);
      }
      else if (response) {
        if(response.status == 401) {
          this._dealUnauthorized(this.caller);
        }
        else {
          this.caller.setState({viewStatus: response.status})
        }
      }
      else {
        this.caller.setState({viewStatus: 400})
      }
    }
}